<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="base" uri="http://qdbp.gitee.io/tags/base/"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>

<% request.setAttribute("MENU",  com.gitee.qdbp.general.system.enums.SysResType.MENU); %>
<% request.setAttribute("GROUP", com.gitee.qdbp.general.system.enums.SysResType.GROUP); %>

<aside class="lyt-sidebar ${param.sidebarClass}">
	<ul class="sidebar-menu ${param.menuClass}">
		<core:forEach var="item" items="${pv.menus}">
		<core:if test="${item.type eq MENU}">
		<li> <a href="${pv.indent}${item.url}"> <i class="fa fa-circle-o"></i> <span>${item.name}</span> </a> </li>
		</core:if>
		<core:if test="${item.type eq GROUP}">
		<li class="header ${item.options.color}">
			<a>
				<i class="<core:if test="${empty item.options.icon}">fa fa-hand-o-right</core:if><core:if test="${not empty item.options.icon}">${item.options.icon}</core:if>"></i> <span>${item.name}</span>
				<core:if test="${not empty item.children and item.type eq GROUP}">
				<span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span>
				</core:if>
			</a>
			<core:if test="${not empty item.children and item.type eq GROUP}">
			<ul class="treeview-menu">
				<core:forEach var="menu" items="${item.children}">
				<li> <a href="${pv.indent}${menu.url}"> <i class="fa fa-circle-o"></i> <span>${menu.name}</span> </a> </li>
				</core:forEach>
			</ul>
			</core:if>
		</li>
		</core:if>
		</core:forEach>
		<core:if test="${pv.module == '/test/'}">
		<li class="header active"> 
			<a> <i class="fa fa-cog"></i> <span>DEMO</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span> </a>
			<ul class="treeview-menu">
				<li> <a href="${pv.indent}/demo/easyui/user-form/"> <i class="fa fa-circle-o"></i> <span>表单页面</span> </a> </li>
				<li> <a href="${pv.indent}/demo/easyui/panel-layout/"> <i class="fa fa-circle-o"></i> <span>复杂布局</span> </a> </li>
				<li> <a href="${pv.indent}/demo/easyui/full-screen/"> <i class="fa fa-circle-o"></i> <span>全屏布局</span> </a> </li>
				<li> <a href="${pv.indent}/demo/easyui/open-popup/"> <i class="fa fa-circle-o"></i> <span>对话框</span> </a> </li>
				<li> <a href="${pv.indent}/demo/easyui/payment/"> <i class="fa fa-circle-o"></i> <span>支付</span> </a> </li>
			</ul>
		</li>
		</core:if>
	</ul>
</aside>
